﻿using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Project_Maverick.Screen.Common
{
    public abstract class DefaultMenu : BaseScreen
    {
        private readonly Background _background;
        private readonly Title _title;

        protected DefaultMenu(Background background, string title, TE_Vector2 stitchSize)
        {
            _background = background;
            _title = new Title(title);
            AddChildren(_background, _title);

            if (stitchSize != null)
            {
                AddChildren(new StitchBackground(stitchSize)
                                {
                                    PositionGridBound = new TE_Vector2(24, 16.5f)
                                });
            }
            
        }

        public override void Exit(bool forward)
        {
            _background.Exit();
            _title.Exit();

            base.Exit(forward);
        }
    }
}